package org.fight.landowner.remoting.protocol;

/**
 * @Author wangxuehao02
 * @Date 2024/2/4 8:49 PM
 * @Description
 **/
public enum LanguageType {

    JAVA((byte) 1),
    JS((byte) 2);

    private final byte code;

     LanguageType(byte code) {
        this.code = code;
    }

    public byte getCode() {
        return code;
    }

    public static LanguageType getByCode(byte code) {
         switch (code) {
             case 1: {
                 return JAVA;
             }
             case 2: {
                 return JS;
             }
             default: {
                 return null;
             }
         }
    }
}
